package com.example.gobang.enums;

public enum ChessModel {
        /**
         * 连五
         */
        LIANWU(10000000, new String[]{"22222"}),
        /**
         * 活四
         */
        HUOSI(1000000, new String[]{"022220"}),
        /**
         * 活三
         */
        HUOSAN(10000, new String[]{"002220", "022200", "020220", "022010"}),
        /**
         * 冲四
         */
        CHONGSI(8000, new String[]{"22220", "02222", "20222", "22022", "22202"}),
        /**
         * 眠三
         */
        MIANSAN(1000, new String[]{"002221", "020221", "022021", "122200", "122020"}),
        /**
         * 活二
         */
        HUOER(800, new String[]{"002200", "022000", "000220"}),
        /**
         * 眠二
         */
        MIANER(50, new String[]{"022100", "002210", "001220", "012200", "002010", "020200"}),
        /**
         * 眠一
         */
        MIANYI(10, new String[]{"002100", "001200", "010200", "000120", "000210"});

        /**
         * 分数
         */
        int score;
        /**
         * 局势数组
         */
        private String[] values;

        ChessModel(int score, String[] values) {
                this.score = score;
                this.values = values;
        }

        public int getScore() {
                return score;
        }
        public String[] getValues() {
                return values;
        }


}

class demo{
        public static void main(String[] args) {
                //ChessModel.values() 返回的是 ChessModel 枚举类型的所有枚举常量的数组。
                // values() 方法是 Enum 类的一个默认方法，该方法返回一个包含枚举类型中所有常量的数组。
                for (ChessModel chessScore : ChessModel.values()) {
                        System.out.println(chessScore.toString());
                        for (String value : chessScore.getValues()) {
                                System.out.println(value);
                        }
                }
        }
}